<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #div1,#div2,#div3{
      padding:50px;
      background: rgb(204, 165, 165);
    }
    #div2{
      background:rgb(196, 101, 24);
    }
    #div3{
      background:rgb(100, 122, 65);
    }
  </style>
</head>
<body>
  <div id="app">
    <!-- <div id="div1" @click="fn1">
      <div id="div2" @click.stop="fn2">
        <div id="div3" @click.stop="fn3"></div>
      </div>
    </div> -->
    <div id="div1" @click.capture="fn1">
      <div id="div2" @click="fn2">
        <div id="div3" @click.capture="fn3"></div>
      </div>
    </div>
    <a href="http://www.baidu.com" @click.prevent="link">点击</a>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      methods: {
        fn1 () {
          alert(1)
        },
        fn2 () {
          alert(2)
        },
        fn3 () {
          alert(3)
        },
        link(){
          console.log(1)
        }
      }
    })
  </script>
</body>
</html>